package cn.sofwin.day0107.homework;

import java.util.Scanner;

/**
 * 从键盘输入一个0~99999之间的任意数，判断输入的数是几位数？
 */
public class Digits {
    public static void main(String[] args) {
        System.out.print("请输入0~99999之间的任意数：");
        Scanner sc = new Scanner(System.in);
        int number = sc.nextInt();
        int sum = 0;
        while (number > 0){
            number /= 10;
            sum++;
        }
        System.out.println(sum + "位数");
    }
}
